#ifndef _TIMING_
#define _TIMING_

// Timing Macros:
// -------------
#include <sys/time.h>
#include <cstdio>
#define START()		    timeval TIMER_start; gettimeofday(&TIMER_start,NULL)
#define STOP(seq,faces) do {\
                        timeval TIMER_res, TIMER_stop; gettimeofday(&TIMER_stop,NULL); \
                        timersub(&TIMER_stop, &TIMER_start, &TIMER_res); \
                        double TIMER_duration = (TIMER_res.tv_sec + TIMER_res.tv_usec/1000000.0); \
                        printf("%i, %12.12f, %i\n", seq, TIMER_duration, faces); \
                        fflush(stdout);} while(0)


#endif /* _TIMING_ */
